/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package engine;

import engine.http.Authentication;
import engine.http.RequestManager;

/**
 *
 */
public class ApplicationManager {

    private final ApplicationContext context;
    private static ApplicationManager INSTANCE;

    public static ApplicationManager getInstance() {
        
        if (INSTANCE == null) {
            
            INSTANCE = new ApplicationManager();
        }
        
        return INSTANCE;
    }

    /**
     * 
     */
    private ApplicationManager() {

        context = new ApplicationContext(this);
    }

    /**
     *
     */
    public void initialize() {

        runGUI();
    }

    /**
     *
     */
    private void runGUI() {
        
//        context.getGUIManager().
    }
    
    public void login(String userName, String password){
//        Authentication.getInstance().login("http://localhost:8080/land/", userName, password);
        RequestManager.getInstance().authenticate(userName, password);
        
    }
}
